import request from 'umi-request'; //接入基座时使用 import { request } from 'ngfe-request'
// 目前我这里的接口用是模客数据

// 用户查询
export async function getUserList(params: object) {
  console.log('getUserList');

  return request('/api/getUserList', {
    method: 'POST',
    data: {
      sysHead: {
        stdSvcInd: 'UserManagementSVC',
        stdIntfcInd: 'detailById',
        stdIntfcVerNo: '1.0.0',
        srcConsmSysInd: 'NGMFEB',
      },
      body: {
        ...params,
      },
    },
  })
}

// 用户数据删除
export async function userDelete(params: object) {
  return request('/api/user/userDelete', {
    method: 'POST',
    data: {
      sysHead: {
        stdSvcInd: 'UserManagementSVC',
        stdIntfcInd: 'detailById',
        stdIntfcVerNo: '1.0.0',
        srcConsmSysInd: 'NGMFEB',
      },
      body: {
        ...params,
      },
    },
  });
}

// 用户数据添加
export async function userListAdd(params: object) {
  return request('/api/user/userListAdd', {
    method: 'POST',
    data: {
      sysHead: {
        stdSvcInd: 'UserManagementSVC',
        stdIntfcInd: 'detailById',
        stdIntfcVerNo: '1.0.0',
        srcConsmSysInd: 'NGMFEB',
      },
      body: {
        ...params,
      },
    },
  });
}

// 用户数据修改
export async function userListUpdate(params: object) {
  return request('/api/user/userListUpdate', {
    method: 'POST',
    data: {
      sysHead: {
        stdSvcInd: 'UserManagementSVC',
        stdIntfcInd: 'detailById',
        stdIntfcVerNo: '1.0.0',
        srcConsmSysInd: 'NGMFEB',
      },
      body: {
        ...params,
      },
    },
  });
}
